#!/bin/bash
set -e

cd $(dirname $0)/..

. ./scripts/version

mkdir -p dist/artifacts
cp bin/kine dist/artifacts/kine${SUFFIX}
file dist/artifacts/kine${SUFFIX}

TAG=${TAG:-${VERSION_TAG}${SUFFIX}}
IMAGE_NAME=${IMAGE_NAME:-kine}
IMAGE=${REPO}/${IMAGE_NAME}:${TAG}

docker build --build-arg ARCH=${ARCH} --tag ${IMAGE} -f package/Dockerfile .
echo Built ${IMAGE}
